#ifndef YCEXTENSIONTOOLBARDECLARATION_H
#define YCEXTENSIONTOOLBARDECLARATION_H
#include <QList>
#include <QSize>
#include <QString>

namespace yc {

class ToolBarDeclaration
{
public:
    struct Item
    {
        enum ListStyle { MENU, COMBBOX };

        QString name; // menu: text, action: extension.action
        QList<Item> children;
        ListStyle style = MENU;

        Item(const QString& n) : name(n) { }
    };

    explicit ToolBarDeclaration(const QString& title, Qt::ToolBarArea area = Qt::TopToolBarArea,
                                const QSize& icon_size = QSize(16, 16));
    ~ToolBarDeclaration() { }

    const QString& title() const { return title_; }
    Qt::ToolBarArea area() const { return area_; }
    const QSize& iconSize() const { return icon_size_; }
    const QList<Item>& items() const { return items_; }
    void addItem(const QString& name, const QString& path = QString());

private:
    QString title_;
    Qt::ToolBarArea area_;
    QSize icon_size_;
    QList<Item> items_;
};

} // namespace yc

#endif // YCEXTENSIONTOOLBARDECLARATION_H
